Feat/notification toast system - #479
Open
Jumongweb wants to merge 12 commits into
Open
Conversation
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Adds in-app toast notifications for XP level-ups and quest completions, giving users immediate feedback when progression events occur.
Closes #197
Changes
Added a NotificationProvider and useNotifications() hook with a public push() method.
Wrapped the application with NotificationProvider.
Added automatic level-up notifications:Level up! You're now Level N
Added automatic quest-completion notifications:Quest complete: [Quest Name] (+N XP)
Added a custom toast queue with no external notification library.
Displays up to three notifications in the top-right corner.
Queues additional notifications and promotes them as visible toasts dismiss.
Automatically dismisses each visible toast after four seconds.
Added CSS-based entrance transitions.
Added tests for event-to-toast conversion and five-toast queue behavior.
Testing
Verified five simultaneous notifications result in three visible toasts and two queued toasts.
Verified queued notifications are promoted after dismissal.
Verified level-up events create the expected notification.
Verified XP awards that do not cross a level boundary do not create level-up notifications.
Verified quest-completion events include the quest name and XP reward.
Notes
The project uses Vitest rather than Jest, so the requested queue test is implemented with Vitest while covering the same acceptance criteria.